/*
============================================================================
 Name        : BlockDPTJ.h
 Author      : \x{738b}\x{658c}
 Version     :
 Copyright   : \x{76ca}\x{76df}\x{8f6f}\x{4ef6}
 Description : CBlockDPTJ declaration
============================================================================
*/

#ifndef BlockDPTJ_H
#define BlockDPTJ_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include "BlockGoods.h"
#include "Flickable.h"
// CLASS DECLARATION

/**
*  CBlockDPTJ
* 
*/
class CBlockDPTJ  : public CBlockGoods, public MFlickableCallback
{
public:
	~CBlockDPTJ();

	static CBlockDPTJ* NewL(CBaseBlock* bsBack);

	static CBlockDPTJ* NewLC(CBaseBlock* bsBack);

	CBlockDPTJ(CBaseBlock* bsBack);

private:
	void ConstructL();

public:
	//from CBlock
	void OnDraw(CFbsBitGc& g)const;

	void OnKeyDown(TInt keyCode);

	void OnInput(const TDesC8& strInput);

	TInt32 GetMenuItem();

	void InitData();

	TBool ReadData(const TDesC8& aData);

	void WriteData(TDes8& aBuf);

	TInt GetDataLength();

	TInt16 GetDataType();

	void ChangeScrollPos(TInt nPos);
	
	void SizeChanged();
    
    void OnMouseDown(const TPoint& aPt);

    void OnMouseMove(const TPoint& aPt);

    void OnMouseUp(const TPoint& aPt);
	
public:
    // from MFlickableCallback
    virtual TPoint ScrollOffset() const;

    virtual void SetScrollOffset(const TPoint& aOffset);
	
protected:
	void AddTabs();

private:
	
	TInt m_nStart;

	CDesCArray* m_pstrFieldName;
	//{
	//	"\x{6301}\x{80a1}\x{5e02}\x{503c}",	"\x{589e}\x{91cf}\x{8d44}\x{91d1}", "\x{6301}\x{80a1}\x{6570}\x{91cf}", "\x{6301}\x{80a1}\x{589e}\x{51cf}", "\x{5360}\x{6d41}\x{901a}\x{80a1}",
	//		"\x{6301}\x{7b79}\x{589e}\x{51cf}", "\x{6301}\x{6709}\x{57fa}\x{91d1}", "\x{57fa}\x{91d1}\x{589e}\x{51cf}","\x{66f4}\x{65b0}\x{65e5}\x{671f}"
	//};

	TInt64 m_plDPTJ[11];
	

    TInt iOffset;
    TInt iHeight;
    CFlickable* iFlickable;
    TRect iListRect;

    mutable TInt iStartItem;
    mutable TInt iEndItem;
};

#endif // BlockDPTJ_H
